/* ==========================================================================
   Fonts custom
   ========================================================================== */
@font-face {
  font-family: '29LT Baseet';
  src: url('/fonts/29lt-baseet-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: '29LT Baseet';
  src: url('/fonts/29lt-baseet-bold.otf') format('opentype');
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Brittany';
  src: url('/fonts/brittany-signature.ttf') format('truetype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
/* Agada : à activer dès que tu auras le fichier
@font-face {
  font-family: 'Agada';
  src: url('/fonts/agada-regular.otf') format('opentype');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
*/

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
  --lilas: #c8a8d8;
  --lilas-soft: #e7d8ef;
  --lilas-deep: #8a6aa0;
  --sauge: #b5c4a8;
  --sauge-soft: #dde6d4;
  --sauge-deep: #6f8666;
  --dore: #c9a96a;
  --dore-soft: #e4d2a6;
  --ink: #3a2f44;
  --ink-soft: #6b6473;
  --bg: #faf7f2;
  --white: #ffffff;
  --shadow: 0 20px 60px -25px rgba(138, 106, 160, 0.35);
  --radius: 22px;

  --font-body: '29LT Baseet', -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Arial, sans-serif;
  /* Agada en premier dès qu'il sera dispo, sinon fallback élégant serif */
  --font-display: 'Agada', "Playfair Display", "Cormorant Garamond", Georgia, serif;
  --font-script: 'Brittany', "Allura", "Apple Chancery", cursive;
}

* {
  box-sizing: border-box;
}

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(circle at 15% 10%, var(--lilas-soft) 0%, transparent 45%),
    radial-gradient(circle at 85% 90%, var(--sauge-soft) 0%, transparent 50%),
    var(--bg);
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 24px 16px;
  min-height: 100vh;
  min-height: 100dvh;
}

.card {
  width: 100%;
  max-width: 520px;
  background: var(--white);
  border-radius: var(--radius);
  padding: 36px 28px 28px;
  box-shadow: var(--shadow);
  border: 1px solid rgba(201, 169, 106, 0.25);
}

.header {
  text-align: center;
  margin-bottom: 28px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.25em;
  font-size: 11px;
  color: var(--sauge-deep);
  margin: 0 0 14px;
  font-weight: 700;
}

.names {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: clamp(36px, 8vw, 52px);
  margin: 0;
  color: var(--ink);
  line-height: 1.05;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.2em;
  flex-wrap: wrap;
}

.name {
  display: inline-block;
}

.amp {
  font-family: var(--font-script);
  color: var(--dore);
  font-size: 1.5em;
  line-height: 1;
  position: relative;
  top: 0.18em;
  margin: 0 0.1em;
  font-weight: 400;
}
.amp.small {
  font-size: 1.2em;
  top: 0.12em;
}

.subtitle {
  margin: 18px 0 0;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.5;
}

/* ==========================================================================
   Vues (toggle entre upload / envoi / succès)
   ========================================================================== */
.view {
  animation: fadeIn 0.35s ease;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.upload-zone {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.drop-area {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 38px 20px;
  border: 2px dashed var(--lilas);
  border-radius: 18px;
  background: linear-gradient(180deg, #fdfbff 0%, #f7f2fa 100%);
  color: var(--lilas-deep);
  cursor: pointer;
  transition: all 0.2s ease;
  text-align: center;
}

.drop-area:hover,
.drop-area.dragover {
  border-color: var(--dore);
  background: linear-gradient(180deg, #fefaf0 0%, #faf3e1 100%);
  color: var(--ink);
}

.icon {
  width: 38px;
  height: 38px;
  stroke: currentColor;
}

.drop-title {
  font-weight: 600;
  font-size: 16px;
}

.drop-hint {
  font-size: 13px;
  color: var(--ink-soft);
}

/* L'attribut HTML [hidden] doit toujours gagner sur display: flex/grid/etc. */
[hidden] {
  display: none !important;
}

.file-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.file-summary {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--sauge-soft);
  border-radius: 14px;
  font-size: 15px;
}

.file-summary-label {
  flex: 1;
  font-weight: 700;
  color: var(--ink);
}

.file-summary-size {
  color: var(--sauge-deep);
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
}

.file-summary #clear-selection {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--lilas-deep);
  font-size: 22px;
  line-height: 1;
  padding: 0 4px;
  transition: color 0.15s ease, transform 0.15s ease;
}
.file-summary #clear-selection:hover {
  color: var(--ink);
  transform: scale(1.15);
}

.submit-btn {
  appearance: none;
  border: none;
  cursor: pointer;
  padding: 16px 24px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--lilas) 0%, var(--lilas-deep) 100%);
  color: white;
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 20px -8px rgba(138, 106, 160, 0.6);
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s;
}

.submit-btn:not(:disabled):hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(138, 106, 160, 0.7);
}

.submit-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.status {
  text-align: center;
  font-size: 14px;
  min-height: 20px;
  color: var(--ink-soft);
}

.status.success { color: var(--sauge-deep); font-weight: 700; }
.status.error   { color: #b85c5c; font-weight: 700; }

/* ==========================================================================
   Vue "Envoi en cours"
   ========================================================================== */
.sending-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 18px;
  padding: 24px 8px;
  text-align: center;
}

.spinner {
  width: 56px;
  height: 56px;
  border: 4px solid var(--lilas-soft);
  border-top-color: var(--lilas-deep);
  border-radius: 50%;
  animation: spin 0.9s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.sending-text {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ink);
}

.sending-hint {
  margin: 0;
  font-size: 13px;
  color: var(--ink-soft);
}

.progress {
  width: 100%;
  height: 8px;
  background: var(--lilas-soft);
  border-radius: 99px;
  overflow: hidden;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, var(--dore), var(--lilas-deep));
  width: 0%;
  transition: width 0.2s ease;
}

/* ==========================================================================
   Vue "Confirmation"
   ========================================================================== */
.success-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  padding: 16px 8px 8px;
  text-align: center;
}

.success-icon {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--sauge-soft) 0%, var(--sauge) 100%);
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 10px 24px -8px rgba(111, 134, 102, 0.5);
  animation: pop 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.success-icon svg {
  width: 38px;
  height: 38px;
}

@keyframes pop {
  0%   { transform: scale(0.4); opacity: 0; }
  100% { transform: scale(1);   opacity: 1; }
}

.success-title {
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 30px;
  margin: 4px 0 0;
  color: var(--ink);
}

.success-text {
  margin: 0 0 12px;
  font-size: 15px;
  color: var(--ink-soft);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
  text-align: center;
  margin-top: 28px;
  font-size: 14px;
  color: var(--ink-soft);
  border-top: 1px solid var(--lilas-soft);
  padding-top: 16px;
  font-family: var(--font-display);
  letter-spacing: 0.03em;
}

.footer p { margin: 0; }
