/* ============================================================
   CLIENTS RÉCURRENTS — modification de planning
   S'appuie sur globalQDLG.css (variables + polices Inter/Lora).
   ============================================================ */
/* ====== Base reprise du système (au cas où globalQDLG ne charge pas) ====== */
/* ====== Layout ====== */
    .recur {
      max-width: 1240px; margin: 0 auto;
      padding: clamp(2rem, 4vw, 3rem) 2rem clamp(3rem, 5vw, 4rem);
    }
    .recur-card {
      background: var(--blanc); border: 1px solid var(--bord); border-radius: var(--r-lg);
      padding: clamp(1.4rem, 2.5vw, 2rem);
      box-shadow: 0 1px 2px rgba(26,26,24,.04), 0 12px 32px rgba(26,26,24,.05);
    }

    .step-heading { display: flex; align-items: flex-start; gap: .85rem; margin-bottom: 1.1rem; }
    .step-number {
      flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
      width: 30px; height: 30px; border-radius: 999px; background: var(--rouge); color: #fff;
      font-size: .9rem; font-weight: 700; line-height: 1;
    }
    .step-heading h3 { font-family: 'Lora', serif; color: var(--rouge); font-size: 1.2rem; margin-bottom: .2rem; }
    .step-heading p { color: var(--texte-2); font-size: .9rem; line-height: 1.5; }

    .top-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; max-width: 620px; align-items: start; }
    .field { display: grid; gap: .4rem; }
    .field label { font-size: .85rem; font-weight: 600; color: var(--texte); }
    .field label .req { color: var(--rouge); }
    .field input, .field select {
      width: 100%; border: 1px solid var(--bord); border-radius: var(--r-md);
      background: var(--fond); color: var(--texte); font: inherit;
      padding: .72rem .85rem; height: 46px;
      transition: border-color .18s, box-shadow .18s, background .18s;
    }
    .field input:focus, .field select:focus {
      outline: 0; border-color: var(--rouge); background: #fff; box-shadow: 0 0 0 3px rgba(122,16,16,.12);
    }

    /* ====== Légende ====== */
    .legend { display: flex; gap: 1.2rem; flex-wrap: wrap; margin: 1.4rem 0 .8rem; font-size: .8rem; color: var(--texte-2); }
    .legend span { display: inline-flex; align-items: center; gap: .35rem; }
    .swatch { width: .8rem; height: .8rem; border-radius: 3px; display: inline-block; }
    .swatch.we { background: #f1ece5; border: 1px solid var(--bord); }
    .swatch.fr { background: var(--or); }
    .swatch.add { background: #1f7a44; }
    .swatch.rem { background: var(--rouge); }

    /* ====== Grille des semaines (colonnes) ====== */
    .weeks { display: grid; grid-template-columns: repeat(var(--wcount, 4), minmax(0, 1fr)); gap: .7rem; align-items: start; }
    .week-col {
      border: 1px solid var(--bord); border-radius: var(--r-lg);
      background: var(--fond); padding: .55rem; display: grid; gap: .5rem;
    }
    .week-head { padding: .15rem .3rem .3rem; border-bottom: 1px solid var(--bord); }
    .week-head b { display: block; font-size: .82rem; color: var(--rouge); font-weight: 700; }
    .week-head small { font-size: .72rem; color: var(--texte-2); }

    .rday {
      border: 1px solid var(--bord); border-radius: 10px; background: #fff; padding: .5rem .55rem;
      display: grid; gap: .45rem;
    }
    .rday.is-weekend { background: #f1ece5; }
    .rday.is-holiday { border-left: 3px solid var(--or); }
    .rday.act-add { border-color: #1f7a44; box-shadow: inset 0 0 0 1px #1f7a44; }
    .rday.act-remove { border-color: var(--rouge); box-shadow: inset 0 0 0 1px var(--rouge); }

    .rday-head { display: flex; align-items: center; justify-content: space-between; gap: .3rem; }
    .rday-name { font-size: .82rem; font-weight: 600; }
    .rday-fr { font-size: .58rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; color: #fff; background: var(--or); padding: .05rem .3rem; border-radius: 4px; }

    .rday-actions { display: grid; grid-template-columns: 1fr 1fr; gap: .3rem; }
    .ract {
      cursor: pointer; font: inherit; font-size: .72rem; font-weight: 600;
      border: 1px solid var(--bord); border-radius: 7px; background: #fff; color: var(--texte-2);
      padding: .34rem .2rem; display: inline-flex; align-items: center; justify-content: center; gap: .2rem;
      transition: background .15s, color .15s, border-color .15s;
    }
    .ract:hover { border-color: #b9b2a9; }
    .ract[data-act="add"].is-on { background: #1f7a44; border-color: #1f7a44; color: #fff; }
    .ract[data-act="remove"].is-on { background: var(--rouge); border-color: var(--rouge); color: #fff; }

    .rday-time { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .3rem; }
    .rday-time[hidden] { display: none; }
    .rday-time-label {
      flex-basis: 100%; font-size: .62rem; font-weight: 700; color: var(--rouge);
      text-transform: uppercase; letter-spacing: .03em;
      font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    }
    .rday-time select {
      border: 1px solid var(--bord); border-radius: 6px; background: var(--fond); font: inherit;
      font-size: .76rem; padding: .3rem .25rem; min-height: 34px; flex: 1; min-width: 0;
    }

    /* ====== Résumé / message ====== */
    .recur-summary { margin-top: 1.6rem; }
    .stats { display: flex; gap: .5rem; margin-bottom: 1rem; flex-wrap: wrap; }
    .stat { background: var(--rouge-lt); border-radius: var(--r-md); padding: .55rem .9rem; }
    .stat b { font-family: 'Lora', serif; color: var(--rouge); font-size: 1.15rem; margin-right: .35rem; }
    .stat span { font-size: .8rem; color: var(--texte-2); }
    .summary-toggle {
      width: 100%; max-width: 420px; text-align: left; cursor: pointer;
      background: var(--fond); border: 1px solid var(--bord); border-radius: var(--r-md);
      padding: .7rem .85rem; font: inherit; font-size: .85rem; font-weight: 600; color: var(--texte);
      display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem;
    }
    .summary-toggle svg { transition: transform .2s; }
    .summary-toggle.open svg { transform: rotate(180deg); }
    .summary-output {
      width: 100%; max-width: 620px; min-height: 12rem; resize: vertical;
      border: 1px solid var(--bord); border-radius: var(--r-md); background: var(--fond); color: var(--texte);
      font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .8rem; line-height: 1.5;
      padding: .85rem; margin-bottom: 1rem; display: block;
    }
    .summary-output[hidden] { display: none; }
    .btn-mail {
      display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
      min-height: 50px; padding: 0 1.4rem; background: var(--rouge); color: #fff; text-decoration: none;
      border-radius: var(--r-md); font-weight: 700; box-shadow: 0 8px 20px rgba(122,16,16,.22);
      transition: background .18s, transform .18s;
    }
    .btn-mail:hover { background: var(--rouge-dk); transform: translateY(-1px); }
    .summary-note {
      margin-top: 1rem; padding: .8rem .9rem; border-left: 3px solid var(--or); border-radius: var(--r-md);
      background: var(--rouge-lt); color: var(--texte-2); font-size: .85rem; line-height: 1.5; max-width: 620px;
    }

    /* Secours sans logiciel de mail : copier le message + adresse en clair */
    .btn-copy {
      min-height: 44px; padding: 0 1.2rem; margin-left: .5rem;
    }
    .send-alt { max-width: 620px; }
    .empty-hint { color: var(--texte-2); font-size: .9rem; font-style: italic; padding: 1rem 0; }

    @media (max-width: 1024px) { .weeks { grid-template-columns: repeat(2, minmax(0,1fr)); } }
    @media (max-width: 620px) {
      .recur { padding-inline: 1rem; }
      .top-grid { grid-template-columns: 1fr; }
      .weeks { grid-template-columns: 1fr; }
    }
