/* ============================================================
   Convertisseur local — feuille de style
   Palette : ivoire chaud, vert profond, encre.
   Polices : Fraunces (titres), Instrument Sans (texte).
   ============================================================ */

:root {
  --ivoire: #F6F3EC;
  --ivoire-2: #EFEBE1;
  --encre: #1C2320;
  --encre-doux: #4A5651;
  --trait: #DDD8CC;
  --vert: #0E6B55;
  --vert-fonce: #0A4F3F;
  --vert-clair: #DCEDE6;
  --vert-tres-clair: #F3F8F5;
  --nuit: #14211C;
  --nuit-trait: #2F4A40;
  --nuit-texte: #EAF2EE;
  --nuit-texte-doux: #B9CBC3;
  --nuit-accent: #7FD1B6;
  --erreur: #A23B2E;
  --erreur-fond: #F7E9E5;

  --rayon-s: 8px;
  --rayon-m: 12px;
  --rayon-l: 16px;
  --rayon-xl: 24px;

  --ombre: 0 1px 2px rgba(20, 33, 28, 0.06);

  --police-titre: "Fraunces", Georgia, "Times New Roman", serif;
  --police-texte: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--police-texte);
  background: var(--ivoire);
  color: var(--encre);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--vert); }
a:hover { color: var(--vert-fonce); }

h1, h2, h3, h4 {
  font-family: var(--police-titre);
  font-weight: 500;
  margin: 0;
  letter-spacing: -0.01em;
}

p { margin: 0; }

button, select, input {
  font-family: inherit;
  font-size: inherit;
  color: inherit;
}

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--vert);
  outline-offset: 2px;
}

.conteneur {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- En-tête ---------- */

.entete {
  height: 76px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--trait);
  background: var(--ivoire);
  position: sticky;
  top: 0;
  z-index: 20;
}

.marque {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--encre);
}

.marque__pastille {
  width: 32px;
  height: 32px;
  border-radius: var(--rayon-s);
  background: var(--vert);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.marque__nom {
  font-family: var(--police-titre);
  font-size: 22px;
  font-weight: 600;
}

.nav-principale {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-principale a {
  color: var(--encre);
  text-decoration: none;
  font-size: 16px;
}

.nav-principale a:hover { color: var(--vert); }

.bouton-menu-mobile {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-s);
  background: transparent;
  align-items: center;
  justify-content: center;
}

/* ---------- Boutons ---------- */

.bouton {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 52px;
  padding: 0 32px;
  border-radius: var(--rayon-m);
  font-size: 17px;
  font-weight: 600;
  text-decoration: none;
  border: none;
  white-space: nowrap;
}

.bouton--primaire {
  background: var(--vert);
  color: #FFFFFF;
}
.bouton--primaire:hover { background: var(--vert-fonce); color: #FFFFFF; }
.bouton--primaire:disabled { background: #B9CBC3; cursor: not-allowed; }

.bouton--discret {
  background: transparent;
  border: 1px solid #BDB7A8;
  color: var(--encre);
}
.bouton--discret:hover { background: var(--ivoire-2); color: var(--encre); }

.bouton--petit {
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
  border-radius: var(--rayon-s);
}

/* ---------- Bandeau bas de page ---------- */

.pied {
  border-top: 1px solid var(--trait);
  padding: 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 15px;
  color: var(--encre-doux);
  flex-wrap: wrap;
  gap: 16px;
}

.pied__liens { display: flex; gap: 32px; }
.pied__liens a { color: var(--encre-doux); text-decoration: none; }
.pied__liens a:hover { color: var(--vert); }

/* ---------- Accueil : héros ---------- */

.heros {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
  padding: 88px 0 72px;
}

.badge {
  display: inline-flex;
  align-self: flex-start;
  align-items: center;
  gap: 10px;
  padding: 8px 16px;
  border-radius: 999px;
  background: var(--vert-clair);
  color: var(--vert-fonce);
  font-size: 15px;
  font-weight: 500;
  margin-bottom: 24px;
}

.heros h1 {
  font-size: 60px;
  line-height: 1.06;
  margin-bottom: 24px;
}

.heros p.lead {
  font-size: 20px;
  line-height: 1.55;
  color: var(--encre-doux);
  max-width: 520px;
  margin-bottom: 28px;
}

.liste-avantages {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
  font-size: 15px;
}

.liste-avantages li {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}

.liste-avantages { padding: 0; margin: 0; }

/* ---------- Zone de dépôt ---------- */

.carte-depot {
  background: #FFFFFF;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-xl);
  padding: 20px;
}

.zone-depot {
  border: 2px dashed #9CB8AD;
  border-radius: var(--rayon-l);
  background: var(--vert-tres-clair);
  padding: 56px 32px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.zone-depot.glisse-active {
  background: var(--vert-clair);
  border-color: var(--vert);
}

.zone-depot__icone {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--vert-clair);
  display: flex;
  align-items: center;
  justify-content: center;
}

.zone-depot__titre {
  font-family: var(--police-titre);
  font-size: 26px;
  font-weight: 500;
}

.zone-depot input[type="file"] { display: none; }

.formats-populaires {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 20px 8px 4px;
  align-items: center;
  font-size: 14px;
}

.puce {
  padding: 6px 12px;
  border-radius: var(--rayon-s);
  background: var(--ivoire-2);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  color: var(--encre);
  border: none;
}

.puce:hover { background: #E6DFCF; color: var(--encre); }

/* ---------- Grille d'outils ---------- */

.section-outils { padding: 24px 0 88px; }

.section-outils__entete {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: 40px;
  gap: 24px;
  flex-wrap: wrap;
}

.section-outils__entete h2 { font-size: 40px; }

.lien-fleche {
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.grille-cartes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.carte-outil {
  background: #FFFFFF;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-l);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  text-decoration: none;
  color: var(--encre);
}

.carte-outil:hover { border-color: #9CB8AD; }

.carte-outil__icone {
  width: 48px;
  height: 48px;
  border-radius: var(--rayon-m);
  background: var(--vert-clair);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--vert-fonce);
}

.carte-outil h3 { font-size: 21px; font-weight: 600; font-family: var(--police-texte); }
.carte-outil p { font-size: 15px; line-height: 1.5; color: var(--encre-doux); }

.tags-formats { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-format {
  padding: 5px 10px;
  border-radius: 6px;
  background: var(--ivoire-2);
  font-size: 13px;
  font-weight: 500;
}

/* ---------- Section confidentialité (fond sombre) ---------- */

.section-confidentialite {
  background: var(--nuit);
  color: var(--nuit-texte);
  padding: 88px 0;
}

.section-confidentialite h2 {
  font-size: 40px;
  max-width: 720px;
  margin-bottom: 56px;
}

.etapes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 48px;
  margin-bottom: 48px;
}

.etape__chiffre {
  font-family: var(--police-titre);
  font-size: 36px;
  color: var(--nuit-accent);
  margin-bottom: 12px;
}

.etape h3 { font-size: 19px; font-weight: 600; color: var(--nuit-texte); margin-bottom: 10px; }
.etape p { font-size: 15px; line-height: 1.55; color: var(--nuit-texte-doux); }

.grille-mesure {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

.carte-mesure {
  border: 1px solid var(--nuit-trait);
  border-radius: var(--rayon-l);
  padding: 32px;
}

.carte-mesure h3 { font-size: 19px; font-weight: 600; color: var(--nuit-texte); margin-bottom: 12px; }
.carte-mesure p { font-size: 15px; line-height: 1.6; color: var(--nuit-texte-doux); }

/* ============================================================
   Page Convertir — interface de l'outil
   ============================================================ */

.page-outil {
  padding: 48px 0 96px;
}

.page-outil__entete { margin-bottom: 32px; }
.page-outil__entete h1 { font-size: 40px; margin-bottom: 10px; }
.page-outil__entete p { font-size: 17px; color: var(--encre-doux); }

.onglets {
  display: flex;
  gap: 8px;
  border-bottom: 1px solid var(--trait);
  margin-bottom: 32px;
  overflow-x: auto;
}

.onglet {
  background: transparent;
  border: none;
  padding: 14px 6px;
  margin-right: 24px;
  font-size: 16px;
  font-weight: 600;
  color: var(--encre-doux);
  border-bottom: 2px solid transparent;
  white-space: nowrap;
}

.onglet.actif {
  color: var(--encre);
  border-bottom-color: var(--vert);
}

.panneau-outil { display: none; }
.panneau-outil.actif { display: block; }

.sous-outils {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}

@media (min-width: 900px) {
  .sous-outils { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

.sous-outil {
  background: #FFFFFF;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-m);
  padding: 18px;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.sous-outil.actif {
  border-color: var(--vert);
  background: var(--vert-tres-clair);
}

.sous-outil__titre { font-weight: 600; font-size: 16px; }
.sous-outil__desc { font-size: 13px; color: var(--encre-doux); line-height: 1.4; }

.zone-travail {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  align-items: start;
}

@media (max-width: 900px) {
  .zone-travail { grid-template-columns: 1fr; }
}

.zone-depot-outil {
  border: 2px dashed #9CB8AD;
  border-radius: var(--rayon-l);
  background: var(--vert-tres-clair);
  padding: 40px 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  text-align: center;
  transition: background 0.15s ease, border-color 0.15s ease;
  margin-bottom: 16px;
}

.zone-depot-outil.glisse-active {
  background: var(--vert-clair);
  border-color: var(--vert);
}

.zone-depot-outil input[type="file"] { display: none; }

.liste-fichiers {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.carte-fichier {
  background: #FFFFFF;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-l);
  padding: 20px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

.carte-fichier__icone {
  width: 48px;
  height: 48px;
  border-radius: var(--rayon-m);
  background: var(--vert-clair);
  color: var(--vert-fonce);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  flex-shrink: 0;
}

.carte-fichier__info {
  flex-grow: 1;
  min-width: 180px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.carte-fichier__nom {
  font-size: 16px;
  font-weight: 600;
  word-break: break-all;
}

.barre-progres {
  height: 8px;
  border-radius: 4px;
  background: var(--ivoire-2);
  overflow: hidden;
}

.barre-progres__valeur {
  height: 8px;
  border-radius: 4px;
  background: var(--vert);
  transition: width 0.2s ease;
}

.carte-fichier__statut { font-size: 14px; color: var(--encre-doux); }
.carte-fichier__statut.pret { color: var(--vert-fonce); font-weight: 500; }
.carte-fichier__statut.erreur { color: var(--erreur); font-weight: 500; }

.carte-fichier__champ {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.carte-fichier__champ label {
  font-size: 13px;
  color: var(--encre-doux);
}

select {
  height: 44px;
  padding: 0 12px;
  border: 1px solid #BDB7A8;
  border-radius: var(--rayon-m);
  background: #FFFFFF;
}

.carte-fichier__retirer {
  background: transparent;
  border: none;
  color: var(--encre-doux);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.carte-fichier__retirer:hover { background: var(--ivoire-2); color: var(--erreur); }

.panneau-lateral {
  background: #FFFFFF;
  border: 1px solid var(--trait);
  border-radius: var(--rayon-l);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 20px;
  position: sticky;
  top: 96px;
}

.panneau-lateral h2 { font-size: 19px; font-weight: 600; font-family: var(--police-texte); }

.champ {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.champ label { font-size: 15px; color: var(--encre-doux); }

.case {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 15px;
}
.case input { width: 20px; height: 20px; accent-color: var(--vert); }

.note-confidentialite {
  font-size: 14px;
  line-height: 1.5;
  color: var(--encre-doux);
}

.etat-vide {
  border: 1px dashed var(--trait);
  border-radius: var(--rayon-l);
  padding: 40px 24px;
  text-align: center;
  color: var(--encre-doux);
  font-size: 15px;
}

.avertissement {
  display: flex;
  gap: 12px;
  background: #FFF6E5;
  border: 1px solid #E9CE8C;
  border-radius: var(--rayon-m);
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  color: #6B4E10;
  margin-bottom: 20px;
}

.masque { display: none !important; }

/* ---------- Bandeau de consentement (cookies / publicité) ---------- */

.bandeau-consentement {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 100;
  background: #14211C;
  color: var(--nuit-texte);
  border-top: 1px solid var(--nuit-trait);
  padding: 20px 24px;
}

.bandeau-consentement__interieur {
  max-width: 1180px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}

.bandeau-consentement p {
  font-size: 15px;
  line-height: 1.5;
  color: var(--nuit-texte-doux);
  max-width: 640px;
}

.bandeau-consentement a { color: var(--nuit-accent); }

.bandeau-consentement__boutons {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}

.bouton--sombre-discret {
  background: transparent;
  border: 1px solid var(--nuit-trait);
  color: var(--nuit-texte);
}
.bouton--sombre-discret:hover { background: rgba(255,255,255,0.06); color: var(--nuit-texte); }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .heros { grid-template-columns: 1fr; padding: 48px 0; }
  .heros h1 { font-size: 42px; }
  .grille-cartes { grid-template-columns: 1fr; }
  .etapes { grid-template-columns: 1fr; }
  .grille-mesure { grid-template-columns: 1fr; }
  .nav-principale { display: none; }
  .bouton-menu-mobile { display: flex; }
}

@media (max-width: 900px) and (min-width: 0px) {
  .conteneur { padding: 0 20px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
