/* ===============================
   Variables & Theming
   =============================== */
:root{
  --brand-bg:#08132b; --brand-bg-2:#0e2b8d; --brand-fg:#ffffff;
  --accent:#0e2b8d;
  --body-bg:#f5f7fb; --body-fg:#0b1020;
  --sidebar-bg:#4B4B4C;

  --header-height:84px; --logo-height:56px; --title-size:1.4rem;
  --sidebar-width:260px;

  /* page transition (truck) */
  --truck-duration:2s; --truck-easing:cubic-bezier(.4,0,.2,1);
  --from:60vw; --to:-120vw; --flip:-1;

  /* Surfaces (s'appuient sur base.css si dispo) */
  --surface-plain: #ffffff;
  --surface-subtle: #f8fafc;

  /* Neutres réemployés (footer / bordures / textes atténués) */
  --surface-muted: #eaeef5;
  --border-muted:  #dfe5ef;
  --border-soft:   #eeeeee;
  --text-muted:    #555555;
  --text-subtle:   #888888;
  --divider:       #bbbbbb;
  
  /* Cartes */
  --card-bg: var(--surface-plain);
  --card-bd: var(--border-muted);
  --card-radius: 16px;
  --card-shadow: 0 2px 6px color-mix(in srgb, #000 6%, transparent);

  /* “Service rows” & sections */
  --service-bg: var(--surface-plain);
  --service-bd: var(--border-soft);
  --service-radius: 12px;
  --service-shadow: 0 1px 4px color-mix(in srgb, #000 5%, transparent);
  --service-gap: 16px;

  /* CTA band */
  --cta-band-bg: var(--surface-subtle);
  --cta-band-bd: var(--border-muted);
  --cta-band-radius: 12px;
}
body.header-sm{--header-height:68px;--logo-height:46px;--title-size:1.05rem;}
body.header-lg{--header-height:104px;--logo-height:72px;--title-size:1.75rem;}

/* ===============================
   Base & Layout
   =============================== */
*{box-sizing:border-box;}
html,body{height:100%;}
body{
  margin:0; background:var(--body-bg); color:var(--body-fg);
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  display:grid;
  grid-template-columns:var(--sidebar-width) 1fr;
  grid-template-rows:var(--header-height) 1fr auto;
  grid-template-areas:
    "header header"
    "sidebar main"
    "footer footer";
}
a{color:var(--accent);text-decoration:none;}
a:hover{text-decoration:underline;}

/* ===============================
   Header
   =============================== */
header.site-header{
  grid-area:header; display:grid; grid-template-columns:1fr auto 1fr; align-items:center; gap:12px;
  background:#4B4B4C; color:#1F1F1F; padding:0 16px; border-bottom:1px solid rgba(255,255,255,.06);
}
.header-left,.header-center,.header-right{display:flex;align-items:center;}
.header-left{padding-left:28px;gap:14px;}
.header-center{flex-direction:column;gap:.35em;min-width:0;}
.header-right{justify-content:flex-end;gap:8px;}
.logo{height:var(--logo-height);width:auto;display:block;filter:drop-shadow(0 1px 0 rgba(255,255,255,.15)) drop-shadow(0 10px 16px rgba(0,0,0,.45));}
.site-title{font-weight:700;color:#5BF3ED;opacity:.9;font-size:var(--title-size);line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.site-slogan{font-size:.95em;color:#5BF3ED;opacity:.85;}
.lang-switch a{display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(255,255,255,.18);background:transparent;color:var(--brand-fg);padding:6px 10px;border-radius:8px;font-weight:600;}
.lang-switch a.active{background:rgba(255,255,255,.1);outline:2px solid rgba(255,255,255,.2);text-decoration:none;}
.flag{height:20px;width:auto;display:inline-block;border-radius:2px;box-shadow:0 0 0 1px rgba(255,255,255,.25) inset;}

/* ===============================
   Sidebar (desktop + mobile)
   =============================== */
#sidebar, aside.sidebar{
  grid-area:sidebar; min-width:220px; background:#4B4B4C; color:#5BF3ED;
  padding:1.2em .7em; border-right:1px solid rgba(91,243,237,0.08);
}
.nav-title{font-weight:600;margin:1em 0 .5em;letter-spacing:.02em;color:#5BF3ED;opacity:.85;}
.sidebar nav ul{list-style:none;margin:0;padding:0;}
.sidebar nav li{margin:4px 0;}
.nav-link{
  display:flex;align-items:center;gap:.5em;padding:.4em .7em;border-radius:8px;
  color:#5BF3ED;text-decoration:none;transition:background .2s,color .2s;
}
.nav-link:hover{background:rgba(91,243,237,0.10);color:#fff;}
.nav-link.active,.nav-link[aria-current="page"]{background:rgba(91,243,237,0.18);color:#08132b;font-weight:700;border-left:4px solid #5BF3ED;}
.nav-link.disabled{color:#aaa;pointer-events:none;}
.nav-icon,.icon{width:1.2em;height:1.2em;display:inline-block;vertical-align:middle;stroke-width:2;color:currentColor;}
#sidebar.open{left:0;box-shadow:0 2px 8px #0002;}

@media (min-width:781px){
  #sidebar{position:static;transform:none;height:auto;z-index:auto;}
}
@media (max-width:780px){
  #sidebar{
    position:fixed; top:var(--header-height); left:0; width:var(--sidebar-width);
    height:calc(100vh - var(--header-height)); background:var(--sidebar-bg);
    overflow:auto; transform:translateX(-100%); transition:transform .25s ease; will-change:transform;
    z-index:2000; display:block; visibility:visible;
  }
  #sidebar.open{transform:translateX(0);}
}
@media (prefers-reduced-motion:reduce){
  @media (max-width:780px){#sidebar{transition:none;}}
}

/* ===============================
   Main / Cards / Media
   =============================== */
main#main{grid-area:main; padding:24px clamp(16px,2.5vw,36px); min-width:0;}
.card{background:#fff;border:1px solid #e5e7eb;border-radius:16px;padding:clamp(16px,2vw,28px);box-shadow:0 2px 6px rgba(15,23,42,.06);}
.card.dashed{border-style:dashed;border-color:#9aa0a6;padding:10px;margin:12px 0;border-radius:8px;}
.main-image{display:block;max-width:100%;height:auto;margin:20px auto 0;border-radius:12px;box-shadow:0 4px 12px rgba(0,0,0,.08);}

/* ===============================
   Services (grid + rows)
   =============================== */
.section-services{
  display:grid; grid-template-columns:1fr; gap:16px;
  padding-top:22px; margin-top:24px; max-width: fit-content;
}
.section-services > h2,
.section-services > #services-subtitle,
.section-services > .cta-band{ grid-column: 1 / -1; }

.section-services > .service-row{
  border:1px solid var(--service-bd);
  border-radius: var(--service-radius);
  padding: 16px;
  background: var(--service-bg);
  display:flex; flex-direction:column;
}

.service-row{
  display:flex; gap: var(--service-gap); align-items:flex-start;
  padding:16px; margin-block:12px;
  border:1px solid var(--service-bd); border-radius: var(--service-radius);
  background: var(--service-bg); box-shadow: var(--service-shadow);
}
.service-row-content{ flex:1 1 auto; min-width:0; }
.service-row-content h3{ margin:.1rem 0 .35rem 0; font-size:1.15rem; }
.service-lead{ margin:.15rem 0 .5rem 0; color:#334155; }
.service-points{ margin:0; padding-left:18px; color:#475569; display:grid; gap:6px; }

#services-title{ margin:0 0 .35rem 0; }
#services-subtitle{ margin:.25rem 0; color:#475569; }

.cta-band{
  margin-top:18px; display:flex; align-items:center; justify-content:space-between; gap:12px;
  border:1px dashed var(--cta-band-bd); background: var(--cta-band-bg);
  padding:14px 16px; border-radius: var(--cta-band-radius);
}
.cta-btn{
  display:inline-block; background:#0ea5e9; color:#fff;
  padding:10px 14px; border-radius:10px; font-weight:700;
}
.cta-btn:hover{ filter:brightness(.95); text-decoration:none; }

/* Icône dans la carte service */
.service-row-ico{
  font-size:5rem; line-height:1; margin-bottom:12px; text-align:center; width:100%;
}

/* Responsive Services */
@media (max-width:640px){
  .service-row{ flex-direction:column; }
}
@media (min-width:720px){
  .section-services{ grid-template-columns:repeat(2, minmax(260px, 1fr)); }
}
@media (min-width:1170px){
  .section-services{ grid-template-columns:repeat(3, minmax(260px, 1fr)); }
}

/* ===============================
   Forms & Buttons
   =============================== */
form input[type="text"],
form input[type="email"],
form input[type="tel"],
form input[type="password"],
form input[type="number"],
form input[type="date"],
form input[type="time"],
form textarea,
form select{
  display:block;width:100%;max-width:520px;margin:.25rem 0 .75rem;
  padding:.6rem .8rem;border:1px solid #ccd;border-radius:10px;background:#fff;color:inherit;font:inherit;
}
form input[type="checkbox"], form input[type="radio"]{display:inline-block;width:auto;max-width:none;margin:0;padding:0;}
button, .btn-gris-bleu{padding:.4rem .5rem;border-radius:10px;border:0;background:#4B4B4C;color:#5BF3ED;cursor:pointer;}

.btn{display:inline-flex;align-items:center;gap:.35rem;padding:.35rem .6rem;border-radius:6px;border:1px solid rgba(0,0,0,.08);background:#f6f7f9;font:inherit;line-height:1;cursor:pointer;transition:background .15s ease,border-color .15s ease,box-shadow .15s ease,transform .02s ease;}
.btn:hover{background:#eef0f3;}
.btn:active{transform:translateY(1px);}
.btn:focus{outline:2px solid #7aa7ff55;outline-offset:1px;}
.btn-icon{padding:.25rem .5rem;min-width:2rem;justify-content:center;}
.btn-move{color:#0b3d91;background:#c7ddff;border-color:#9ec0ff;}
.btn-move:hover{background:#b3d1ff;}
.btn-move:active{background:#a4c7ff;}
.btn-danger{color:#7f0f20;background:#f7b9c4;border-color:#f094a5;}
.btn-danger:hover{background:#f4a3b2;}
.btn-danger:active{background:#f08da0;}
.btn-primary{background:#5BF3ED;color:#08132b;padding:.6rem 1rem;border-radius:10px;font-weight:700;text-decoration:none;}
.btn-primary:hover{filter:brightness(.95);text-decoration:none;}
.btn-ghost{color:#0b1020;border:1px solid #94a3b8;padding:.55rem .9rem;border-radius:10px;text-decoration:none;background:#fff;}
.btn-ghost:hover{background:#f8fafc;}
.btn-success {
  color: #0f5132;              /* texte vert foncé */
  background: #d1e7dd;         /* vert clair */
  border-color: #badbcc;       /* vert pâle */
}

.btn-success:hover {
  background: #badbcc;         /* un peu plus foncé au survol */
}

.btn-success:active {
  background: #a3cfbb;         /* encore un cran plus foncé */
}
/* Flash */
.flash{padding:.75rem 1rem;border-radius:.5rem;margin:.75rem 0;}
.flash-success{background:#e8f6ee;border:1px solid #b7e3c4;color:#146c43;}
.flash-error{background:#fdecea;border:1px solid #f5c2c7;color:#842029;}
.flash-warning{background:#fff3cd;border:1px solid #ffe69c;color:#664d03;}
.flash-info{background:#e7f1ff;border:1px solid #b6d4fe;color:#084298;}
/* ===============================
/* ===============================
/* ===============================
   Orders tables
   =============================== */
/* =============================== */
/* =============================== */

/* Conteneur de la table principale (listing des commandes) */
.table-orders  {
  width: 100%;                 /* prend toute la largeur du conteneur (modifiable : 100% → 96% pour respirer) */
  border-collapse: collapse;   /* fusionne les bordures adjacentes (classique pour un rendu “tableau”) */
  table-layout: fixed;         /* largeur des colonnes figée selon la 1re ligne / width (modifiable : auto pour laisser le contenu décider) */
  margin-top: .5rem;           /* espace au-dessus de la table (modifiable : .25rem / 1rem) */
}

/* Cellules (headers + cellules) */
.table-orders th,
.table-orders td {
  padding: 8px 10px;           /* espacement interne (modifiable : 6px 8px pour densifier) */
  border: 1px solid #e1e4e8;   /* bordure gris clair (modifiable : couleur/épaisseur) */
  vertical-align: middle;         /* alignement vertical en haut (modifiable : middle pour centrer verticalement) */
  background: #fff;            /* fond blanc (modifiable : #fcfcfc si tu veux un léger gris) */
  overflow-wrap: anywhere;       /* permet au texte long de se couper (deprecated → voir overflow-wrap) */
  /* Pistes:
     - Tu peux remplacer word-wrap par overflow-wrap: anywhere; (cf. plus bas)
  */
}

/* En-têtes de colonnes */
.table-orders thead th {
  background: #f6f8fa;         /* fond gris des headers (modifiable) */
  font-weight: 600;            /* texte un peu plus gras (modifiable) */
  text-align: center;
}

/* Zébrage des lignes (une ligne sur deux) */
.table-orders tbody tr:nth-child(even) td {
  background: #fafbfc;         /* léger gris (modifiable : #f8fafc ou rien pour enlever le zébrage) */
}

.table-orders td {
  text-align: center;           /* aligne à droite (modifiable : center/left) */
}

.table-orders td.col-company, .table-orders th.col-company{
  width: 150px;                /* largeur fixe pour une date/heure compacte (modifiable) */
}

.table-orders td.col-title, .table-orders th.col-title{
  width: 180px;       /* largeur fixe pour une date/heure compacte (modifiable) */
  text-align: center; 
}


/* Colonne status + updated at */
.table-orders td.col-status, .table-orders th.col-status{
  width: 130px;                /* largeur fixe pour une date/heure compacte (modifiable) */
}

/* Colonne Départ (date/heure) + lieu */ 
.table-orders td.col-depart, .table-orders th.col-depart{
  width: 120px;                /* largeur fixe pour une date/heure compacte (modifiable) */
}


.table-orders td.col-truck, .table-orders th.col-truck{
  width: 100px;                /* largeur fixe pour une date/heure compacte (modifiable) */
}

/* colonne stops*/
.table-orders td.col-stops, .table-orders th.col-stops{
  width: 100px;                /* largeur fixe pour une date/heure compacte (modifiable) */
}
      
/* Colonne Actions (boutons) */
.table-orders .col-actions {
  width: 200px;                /* largeur fixe pour contenir les boutons (modifiable : 150–240px) */
  white-space: nowrap;         /* évite de casser les boutons à la ligne (modifiable : normal si responsive) */
  text-align: center;           /* aligne à droite (modifiable : center/left) */
}

/* Les <form> d’action dans la colonne Actions */
.table-orders .col-actions form {
  display: inline-block;       /* pour aligner plusieurs formulaires/boutons sur la même ligne */
  margin: 0 2px;               /* petit espacement horizontal entre boutons (modifiable) */
}

/* ===============================
   RESPONSIVE (tablette / mobile)
   =============================== */
@media (max-width: 720px) {
  .table-orders {
    table-layout: auto;        /* laisse le contenu décider des largeurs (souvent mieux sur mobile) */
  }
  .table-orders .col-address,
  .table-orders .col-notes,
  .table-orders .col-contact {
    width: auto;               /* retire les largeurs fixées pour éviter les débordements */
  }
  .table-orders .col-actions {
    white-space: normal;       /* autorise les boutons à passer à la ligne si manque d’espace */
  }
}

/* ===============================
   LIGNE D’AJOUT DE DATES (UI)
   =============================== */

/* Ligne contenant input date + bouton remove (X) */
.date-row {
  display: flex;               /* alignement horizontal (input + bouton) */
  align-items: center;         /* centrage vertical des éléments */
  gap: 8px;                    /* espace entre l’input et le bouton (modifiable) */
  /* white-space: nowrap; */   /* 👉 décommente si tu veux forcer tout sur 1 ligne sans wrap */
}

/* Champ date dans la ligne */
.date-row input[type="date"] {
  flex: 1 1 auto;              /* l’input prend l’espace disponible (modifiable : 0 1 auto pour ne pas s’étirer) */
  min-width: 180px;            /* limite minimale de largeur (modifiable : 160–220px) */
}

/* Bouton “X” (icône) dans la ligne */
.date-row .btn-icon {
  line-height: 1;              /* supprime l’extra-line-height autour de l’icône/texte */
  padding: .35rem .6rem;       /* taille du bouton (modifiable) */
  min-width: 2rem;             /* évite un bouton trop petit (modifiable) */
  height: 2.2rem;              /* hauteur visuelle cohérente (modifiable) */
  display: inline-flex;        /* pour centrer précisément le contenu */
  align-items: center;         /* centrage vertical du contenu */
  justify-content: center;     /* centrage horizontal du contenu */
}

/* Pastille/badge (ex: +2 dates) */
.badge {
  display: inline-block;       /* s’aligne dans le flux du texte */
  margin-left: .35rem;         /* espace avant la pastille (modifiable) */
  padding: .1rem .45rem;       /* taille interne de la pastille (modifiable) */
  font-size: 1em;            /* pastille un peu plus petite que le texte (modifiable) */
  font-weight: 700;            /* texte en gras (modifiable) */
  line-height: 1;              /* pas d’espace vertical supplémentaire */
  border-radius: 999px;        /* forme “pilule” */
  background: #e5f2ff;         /* fond bleu très clair (modifiable pour autre statut) */
  color: #0b3d91;              /* texte bleu (modifiable) */
  border: 1px solid #cfe3ff;   /* bordure bleu clair (modifiable) */
}

/* ===============================
   BOUTONS LIGNES DE COMMANDE (édition)
   =============================== */
.table-order-lines th, .table-order-lines td {
  padding: 8px 10px;           /* espacement interne (modifiable : 6px 8px pour densifier) */
  border: 1px solid #e1e4e8;   /* bordure gris clair (modifiable : couleur/épaisseur) */
  vertical-align: center;         /* alignement vertical en haut (modifiable : middle pour centrer verticalement) */
  background: #fff;            /* fond blanc (modifiable : #fcfcfc si tu veux un léger gris) */
  overflow-wrap: anywhere;       /* permet au texte long de se couper (deprecated → voir overflow-wrap) */
  /* Pistes:
     - Tu peux remplacer word-wrap par overflow-wrap: anywhere; (cf. plus bas)
  */
}

.table-order-lines thead th {
  background: #f6f8fa;         /* fond gris des headers (modifiable) */
  font-weight: 600;            /* texte un peu plus gras (modifiable) */
  text-align: center;
}

.table-order-lines .col-actions .btn-order-line {
  font-size: 1.1rem;           /* texte/icone plus gros pour les actions (modifiable : 1rem si trop grand) */
  padding: .45rem .75rem;      /* plus d’espace autour (modifiable) */
  min-width: 2.4rem;           /* taille minimale (pour garder des boutons carrés) */
  height: 2.4rem;              /* hauteur fixe (carré) */
  display: inline-flex;        /* permet un centrage propre */
  align-items: center;         /* centrage vertical */
  justify-content: center;     /* centrage horizontal */
}

/* Zébrage des lignes (une ligne sur deux) */
.table-order-lines tbody tr:nth-child(even) td {
  background: #fafbfc;         /* léger gris (modifiable : #f8fafc ou rien pour enlever le zébrage) */
}

.table-order-lines .col-seq {
  width: 30px;                 /* largeur fixe pour la colonne # (modifiable : 36–56px) */
  text-align: center;          /* centrer le contenu (#) */
}

/* Colonne Type (pickup/dropoff) */
.table-order-lines .col-type {
  width: 60px;                 /* largeur fixe (modifiable) */
  white-space: nowrap;         /* évite les retours à la ligne (modifiable : normal si tu veux autoriser les retours) */
  text-align: center;          /* centrer le contenu (#) */
}

/* Colonne action (pickup/dropoff) */
.table-order-lines .col-actions {
  width: 180px;                 /* largeur fixe (modifiable) */
  white-space: nowrap;         /* évite les retours à la ligne (modifiable : normal si tu veux autoriser les retours) */
}

.table-order-lines .col-depart {
  width: 90px;                 /* largeur fixe (modifiable) */
  white-space: nowrap;         /* évite les retours à la ligne (modifiable : normal si tu veux autoriser les retours) */
}

.table-order-lines .col-address {
  width: 300px;                 /* largeur fixe (modifiable) */
  white-space: nowrap;         /* évite les retours à la ligne (modifiable : normal si tu veux autoriser les retours) */
}

.table-order-lines .col-notes {
  width: 300px;                 /* largeur fixe (modifiable) */
  white-space: nowrap;         /* évite les retours à la ligne (modifiable : normal si tu veux autoriser les retours) */
}

/* Variante : bouton-icône seulement */
.btn-order-line.btn-icon {
  line-height: 1;              /* neutralise l’impact de line-height sur l’alignement */
}

/* Espacement entre boutons consécutifs */
.btn-order-line + .btn-order-line {
  margin-left: .25rem;         /* espace horizontal constant entre deux actions (modifiable) */
}

/* Survol des boutons dans la table des commandes (listing) */
.table-orders .col-actions .btn-order-line:hover {
  background: inherit;         /* conserve la couleur d’origine (déjà définie par .btn/.btn-danger/.btn-move, etc.) */
  filter: brightness(.95);     /* léger feedback visuel au hover (modifiable : .97/.93) */
}

.route-banner{ align-items: center !important; }
.route-actions{ align-items: center !important; display: flex; gap: 8px; flex-wrap: wrap; }
.route-actions form{ display:flex; align-items:center; margin:0; }




/* ===============================
   BLOC D’ACTIONS EN DEUX LIGNES
   =============================== */

/* Conteneur vertical pour 2 lignes d’actions (ex: Accepter/Decliner, puis Ouvrir) */
.order-actions {
  display: flex;               /* layout flex */
  flex-direction: column;      /* empile les rangées verticalement */
  gap: .3rem;                  /* espace entre la 1re rangée et la 2e (modifiable) */
}

/* Chaque rangée d’actions (les boutons côte à côte) */
.order-actions .actions-row {
  display: flex;               /* aligne les boutons en ligne */
  justify-content: center;     /* centre les boutons dans la cellule (modifiable : flex-start/right) */
  gap: .1rem;                  /* espace entre boutons d’une même rangée (modifiable) */
}

/* ===============================
   CONSEILS OPTIONNELS
   ===============================
   - Pour un wrapping plus agressif sur toutes les tables:
     .table-orders th, .table-orders td { overflow-wrap: anywhere; }
   - Pour centrer verticalement partout:
     remplace vertical-align: top; par vertical-align: middle; sur th/td.
   - Si les boutons paraissent “trop grands” dans la liste:
     force une taille plus petite via .table-orders .btn { font-size:.9rem; padding:.3rem .5rem; }
*/

.route-banner{ margin-top:12px; padding:12px 14px; border:1px solid #e1e4e8; border-radius:12px; background:#f8fafc; display:flex; justify-content:space-between; gap:12px; align-items:center; }
.route-infos{ display:flex; gap:16px; flex-wrap:wrap; }
.route-actions .btn{ margin-left:8px; }
/* Conteneur grille pour les deux colonnes pickup/dropoff */
.init-steps-grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* deux colonnes de largeur égale */
  gap: 20px;                      /* espace horizontal entre les colonnes */
  margin: 20px 0;
  align-items: start;             /* aligne le haut des colonnes */
}

/* Style de chaque colonne */
.init-col {
  background: #fff;
  border: 1px solid #ddd;
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 1px 2px rgba(0,0,0,.05);
}

.init-col h4 {
  margin-top: 0;
  margin-bottom: 12px;
}

.init-col form label {
  font-weight: 600;
  display: block;
  margin-top: 8px;
  margin-bottom: 4px;
}

.init-col form select,
.init-col form input[type="text"] {
  width: 100%;
  padding: 6px 8px;
  border: 1px solid #ccc;
  border-radius: 6px;
  margin-bottom: 10px;
}

.init-col form button {
  margin-top: 6px;
}

/* si pas déjà présent */
.is-hidden{display:none;}


/* ===============================
/* ===============================
/* ===============================
   Addresses tables
   =============================== */
/* =============================== */
/* =============================== */
/* --------------tables -----------*/
.table-addresses{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  margin-top:.5rem;
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:12px;
  overflow:hidden;

  /* widths in one place */
  --w-zip: 110px;
  --w-country: 55px;
  --w-actions: 200px;
}
.table-addresses th,
.table-addresses td{
  padding:8px 10px;
  border-bottom:1px solid #eef0f3;
  vertical-align:middle;
  overflow-wrap:anywhere;
  text-align:left;
}
.table-addresses thead th{
  background:#f6f8fa;
  font-weight:600;
  text-align:center;
}
.table-addresses tbody tr:nth-child(even) td{
  background:#fafbfc;
}

/* FIXED columns */
.table-addresses thead th.col-zipcode { width: var(--w-zip); }
.table-addresses thead th.col-country { width: var(--w-country); }
.table-addresses thead th.col-actions { width: var(--w-actions); }

/* Colonnes flex (% du reste) */
.table-addresses thead th.col-label   { width: calc(var(--w-zip) * 1.5); }
.table-addresses thead th.col-address { width: calc(var(--w-zip) * 2); }
.table-addresses thead th.col-town    { width: calc(var(--w-zip) * 1); }
/*.table-addresses thead th.col-notes   { width: calc(var(--w-zip) * 2); }*/

/* Alignements / retours → td/th */
.table-addresses td.col-zipcode, th.col-zipcode,
td.col-country, th.col-town,
td.col-actions, th.col-actions {
  text-align:center;
  white-space:nowrap;
}

.table-addresses td.col-address, th.col-address,
td.col-notes, th.col-notes {
  white-space:normal;
}

.table-addresses .badge-province{
  display:inline-block;
  font-weight:700;
  font-size:.85rem;
  padding:.15rem .45rem;
  border-radius:999px;
  background:#e5f2ff;
  border:1px solid #cfe3ff;
  color:#0b3d91;
}

/* Group headers (province / company) */
.addr-group{
  margin:1rem 0 .25rem;
  font-weight:700;
  color:#0b1020;
  display:flex;
  align-items:center;
  gap:.5rem;
}
.addr-subgroup{
  margin:.4rem 0 .25rem;
  font-weight:600;
  color:#334155;
  display:flex;
  align-items:center;
  gap:.45rem;
}

/* Responsive: card-like rows under 720px */
@media (max-width:720px){
  .table-addresses,
  .table-addresses thead,
  .table-addresses tbody,
  .table-addresses th,
  .table-addresses td,
  .table-addresses tr { display:block; }
  .table-addresses thead{ display:none; }
  .table-addresses tr{
    border:1px solid #e5e7eb;
    border-radius:12px;
    padding:10px;
    margin-bottom:10px;
    background:#fff;
  }
  .table-addresses td{
    border:none;
    padding:6px 0;
  }
  .table-addresses td[data-label]::before{
    content:attr(data-label) " ";
    font-weight:700;
    display:inline-block;
    min-width:120px;
    color:#475569;
  }
  .table-addresses .col-actions{
    text-align:left;
    margin-top:.25rem;
  }
}

details summary {
  display: flex;
  align-items: center;
  cursor: pointer;
}

details summary h2,
details summary h3 {
  margin: 0;        /* évite le décalage vertical */
}


/* --------------forms -----------*/
/* ===== Formulaire Adresses (V2 champs existants) ===== */
.addr-form{
  background:#fff;
  border:1px solid #e5e7eb;
  border-radius:14px;
  padding:16px;
  box-shadow:0 4px 20px rgba(2,6,23,.04);
  display:flex;
  flex-direction:column;
  gap:16px;
}

.addr-form__header{
  display:flex; justify-content:space-between; align-items:flex-start; gap:12px;
}
.addr-form__title{ margin:0; font-size:1.15rem; line-height:1.25; }
.addr-form__badges{ display:flex; gap:6px; flex-wrap:wrap; }
.addr-chip{
  display:inline-block; padding:.15rem .5rem; font-size:.8rem; font-weight:600;
  color:#0b3d91; background:#e5f2ff; border:1px solid #cfe3ff; border-radius:999px;
}

.addr-card{ border:1px solid #eef0f3; border-radius:12px; padding:12px; }
.addr-card legend{ font-weight:600; padding:0 6px; color:#0b1020; }

.addr-grid{ display:grid; grid-template-columns:1fr 1fr 1fr; gap:12px; }

.addr-grid--label-alias {
  display: grid;
  grid-template-columns: 35% 15% 35% 15%;
  gap: 0; /* on gère l'espace par les colonnes vides */
  align-items: start;
}

.addr-grid--label-alias .addr-field {
  margin-bottom: 0.5rem;
}
.addr-grid--2{ grid-template-columns:2fr 1fr 1fr 1fr; gap:12px; }
.addr-field--wide{ grid-column:1 / -1; }

.addr-field label{ display:block; font-weight:600; margin:0 0 .25rem; }
.addr-field input,
.addr-field select,
.addr-field textarea{
  width:100%; border:1px solid #d8dee6; border-radius:10px;
  padding:10px 12px; background:#fff; outline:none;
  transition:border-color .15s ease, box-shadow .15s ease;
}
.addr-field input:focus,
.addr-field select:focus,
.addr-field textarea:focus{
  border-color:#8ab4f8; box-shadow:0 0 0 3px rgba(138,180,248,.25);
}
.addr-hint{ display:block; margin-top:.25rem; color:#6b7280; font-size:.8rem; }

.addr-actions{ display:flex; justify-content:flex-end; gap:.5rem; padding-top:4px; border-top:1px dashed #e5e7eb; }
.addr-card--admin{ background:#fcfdff; border-color:#e0ecff; }

/* Responsive */
@media (max-width:880px){
  .addr-grid{ grid-template-columns:1fr 1fr; }
  .addr-grid--2{ grid-template-columns:1fr; }
}
@media (max-width:520px){
  .addr-form{ padding:12px; }
  .addr-grid{ grid-template-columns:1fr; }
}



/* =============================== */
/* =============================== */
/* ===============================
   Admin Users
   =============================== */
/* =============================== */
/* =============================== */

.table-admin-users{table-layout:fixed;width:100%;border-collapse:collapse;}
.table-admin-users th,.table-admin-users td{padding:6px 8px;vertical-align:middle;}
.table-admin-users th{font-weight:600;}
.table-admin-users col.col-email{width:22%;}
.table-admin-users col.col-name{width:15%;}
.table-admin-users col.col-phone{width:15%;}
.table-admin-users col.col-role{width:12%;}
.table-admin-users col.col-company{width:20%;}
.table-admin-users col.col-active{width:6%;}
.table-admin-users col.col-actions{width:10%;}
.table-admin-users input[type="text"],.table-admin-users input[type="tel"],.table-admin-users select{width:100%;max-width:240px;box-sizing:border-box;padding:4px 6px;font-size:14px;}
.table-admin-users .cell-center{display:flex;align-items:center;justify-content:center;gap:6px;}
.table-admin-users .text-center{text-align:center;}
.table-admin-users .chk-center{display:flex;align-items:center;justify-content:center;}
.table-admin-users .chk-center input[type="checkbox"]{transform:scale(1.05);}
.table-admin-users .btn-save{padding:6px 10px;font-size:14px;cursor:pointer;}

@media (max-width:900px){
  .table-admin-users col.col-email{width:26%;}
  .table-admin-users col.col-name{width:18%;}
  .table-admin-users col.col-phone{width:14%;}
  .table-admin-users col.col-role{width:12%;}
  .table-admin-users col.col-company{width:20%;}
  .table-admin-users col.col-active{width:5%;}
  .table-admin-users col.col-actions{width:5%;}
  .table-admin-users input[type="text"],.table-admin-users input[type="tel"],.table-admin-users select{max-width:200px;}
}

/* ===============================
   Admin Companies
   =============================== */
.admin-company-form{
  display:grid;grid-template-columns:1fr 1fr;gap:1.25rem;margin-top:.75rem;
}
.admin-company-form .pane{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:12px 14px;box-shadow:0 1px 2px rgba(0,0,0,.04);}
.admin-company-form .pane h3{margin:0 0 .5rem;font-size:1rem;font-weight:600;}
.admin-company-form .form-group{margin-bottom:.75rem;}
.admin-company-form .form-group label{display:block;margin-bottom:.25rem;font-weight:500;}
.admin-company-form input[type="text"],
.admin-company-form textarea,
.admin-company-form select{width:100%;box-sizing:border-box;padding:6px 8px;font-size:14px;}
.truck-types-card{text-align:left;}
.truck-types-card .toolbar{display:flex;gap:.5rem;margin:.25rem 0 .5rem;justify-content:flex-start;}
.truck-types-list{display:block;text-align:left;}
.truck-types-list .tt-row{display:flex;align-items:center;justify-content:flex-start;gap:.5rem;padding:.35rem .5rem;border:1px solid #eef0f2;border-radius:8px;margin-bottom:.5rem;background:#fafafa;}
.truck-types-list .tt-row input[type="checkbox"]{transform:translateY(1px);}
.truck-types-list .tt-row span{display:inline-block;}
.admin-company-form .actions{grid-column:1 / -1;margin-top:.25rem;}
.admin-company-form .btn-primary{padding:8px 14px;font-size:14px;cursor:pointer;}
@media (max-width:900px){.admin-company-form{grid-template-columns:1fr;}}

/* ===============================
   Page transition / Camion
   =============================== */
.page-transition{position:fixed;inset:0;z-index:9999;display:none;pointer-events:none;background:transparent;}
.page-transition.run{display:block;}
.page-transition .truck{position:absolute;bottom:10vh;left:50vw;width:clamp(120px,18vw,280px);height:auto;transform:translateX(var(--from)) scaleX(var(--flip));transform-origin:center;animation:none;}
@keyframes driveAcrossVar{from{transform:translateX(var(--from)) scaleX(var(--flip));} to{transform:translateX(var(--to)) scaleX(var(--flip));}}
.page-transition.run .truck{animation:driveAcrossVar var(--truck-duration) var(--truck-easing) forwards;}
@media (prefers-reduced-motion:reduce){.page-transition.run .truck{animation-duration:1s;}}

/* ===============================
   Responsive Layout (global)
   =============================== */
@media (max-width:1024px){.services-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (max-width:780px){
  body{
    grid-template-columns:1fr;
    grid-template-rows:var(--header-height) auto 1fr auto;
    grid-template-areas:"header" "sidebar" "main" "footer";
  }
  aside.sidebar{border-right:none;border-bottom:1px solid rgba(255,255,255,.08);}
  .site-title{font-size:calc(var(--title-size)*.95);}
}
@media (max-width:560px){.services-grid{grid-template-columns:1fr;}}
@media (max-width:480px){.header-center{display:none;}}

/* ===============================
   Footer
   =============================== */
footer.footer{
  grid-area:footer; display:flex;flex-direction:column;align-items:center;justify-content:center;
  text-align:center;color:#555;font-size:.95em;margin-top:2rem;padding:1rem 0;border-top:1px solid #eee;
}
.footer-copy{margin:.25rem 0;}
.footer-links{margin:.4rem 0;}
.footer-links ul{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;gap:.5rem;list-style:none;margin:0;padding:0;}
.footer-links li{display:flex;align-items:center;}
.footer-links li+li::before{content:"•";color:#bbb;margin:0 .4rem;}
.footer-links a{color:#0E2B8D;text-decoration:none;}
.footer-links a:hover{text-decoration:underline;}
.footer-lang{color:#888;font-size:.9em;margin-top:.2em;}
.footer-address{margin:.35rem 0 .6rem;line-height:1.5;color:#555;font-style:normal;}
.footer-address .org{font-weight:600;}
.footer-address .dot{margin:0 .4rem;color:#bbb;}
.footer-address a{color:#0E2B8D;text-decoration:none;}
.footer-address a:hover{text-decoration:underline;}

/* ===============================
   Home (quote & stats)
   =============================== */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}
.quote-card{border:1px solid #e5e7eb;border-left:6px solid #5BF3ED;border-radius:12px;padding:18px 20px;background:#fff;}
.quote-card blockquote{margin:0;color:#0b1020;}
.quote-card p{margin:.35rem 0;line-height:1.5;}
.quote-card.with-stats{display:flex;flex-direction:column;gap:.6rem;}
.stat-chips{display:flex;flex-wrap:wrap;gap:.45rem .55rem;margin:.2rem 0 .1rem;padding:0;list-style:none;}
.stat-chips li{background:#f1f5f9;color:#0b1020;border:1px solid #e2e8f0;border-radius:999px;padding:.35rem .7rem;font-weight:600;font-size:.95em;white-space:nowrap;}
.quote-cta{display:flex;gap:.6rem;flex-wrap:wrap;margin-top:.2rem;}
@media (max-width:640px){.quote-card{padding:16px;} .stat-chips li{font-size:.92em;}}

/* ===============================
   Alert rail (3 colonnes)
   =============================== */
.alert-rail{
  --rail-bg:#fffae6; --rail-fg:#6b4e00; --rail-bd:#f0d48a;
  --icon-max:60px; --icon-min:32px; --gap:12px;
  display:grid; grid-template-columns:minmax(var(--icon-min),var(--icon-max)) 1fr minmax(var(--icon-min),var(--icon-max));
  align-items:stretch; gap:var(--gap);
  background:var(--rail-bg); color:var(--rail-fg); border:1px solid var(--rail-bd); border-radius:8px; padding:10px; margin:12px auto; max-width:fit-content;
}
.alert-rail__body{display:flex;align-items:center;justify-content:center;text-align:center;padding:6px 4px;}
.alert-rail__icon{display:flex;align-items:center;}
.alert-rail__icon--left{justify-content:flex-end;}
.alert-rail__icon--right{justify-content:flex-start;}
.icon-warning{color:#ff7a00;}
.alert-rail__icon .icon{height:min(var(--icon-max),100%);width:auto;}
.alert-rail__text{max-width:65ch;line-height:1.35;font-size:.95rem;}
@media (max-width:520px){.alert-rail{--icon-max:64px;}}

/* ===============================
   Generic table (fallback styles)
   =============================== */
table{border-collapse:collapse;width:100%;margin:1em 0;font-size:.95rem;}
th,td{border:1px solid #ccc;padding:6px 10px;text-align:left;}
thead th{background:#f0f0f0;font-weight:bold;}
