/* tarifs.css — Page-specific styles for pricing pages */
/* Extracted from inline <style> to improve caching and maintainability */

.vertical-tabs {
      display: flex;
      gap: 0.5rem;
      justify-content: center;
      margin-bottom: 2rem;
      flex-wrap: wrap;
    }
    .vertical-tab {
      background: rgba(0,0,0,0.05);
      border: 1px solid rgba(0,0,0,0.1);
      border-radius: 100px;
      padding: 0.5rem 1.25rem;
      font-size: 0.875rem;
      font-weight: 600;
      color: var(--text-muted);
      cursor: pointer;
      transition: all 0.2s;
    }
    .vertical-tab:hover, .vertical-tab.active {
      background: rgba(0, 51, 102, 0.15);
      border-color: var(--blue);
      color: var(--text);
    }

    .conditions-grid {
      display: grid;
      grid-template-columns: repeat(2, 1fr);
      gap: 1.5rem;
      margin-top: 2rem;
    }
    .condition-card {
      background: rgba(255,255,255,0.08);
      border: 1px solid rgba(255,255,255,0.12);
      border-radius: 12px;
      padding: 1.5rem;
      transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
      position: relative;
      overflow: hidden;
    }
    .condition-card:hover {
      transform: translateY(-4px);
      background: rgba(255,255,255,0.12);
      box-shadow: 0 12px 30px rgba(0, 0, 0, 0.2);
    }
    .condition-card::before {
      content: '';
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--blue-dark), var(--yellow));
      transform: scaleX(0);
      transition: transform 0.3s ease;
    }
    .condition-card:hover::before {
      transform: scaleX(1);
    }
    .condition-card h3 {
      font-size: 1rem;
      font-weight: 600;
      margin-bottom: 0.5rem;
      color: #ffffff;
    }
    .condition-card p {
      font-size: 0.875rem;
      color: rgba(255,255,255,0.7);
      line-height: 1.5;
    }
    .condition-card .value {
      color: var(--yellow);
      font-weight: 600;
    }

    .bloc-group { margin-bottom: 3rem; }
    .bloc-group h3 {
      font-size: 1.75rem;
      font-weight: 700;
      margin-bottom: 0.5rem;
      color: var(--blue);
      text-align: center;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.75rem;
      flex-wrap: wrap;
    }
    .bloc-group h3 .bloc-subtitle {
      width: 100%;
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--blue);
      margin-top: -0.25rem;
    }
    .bloc-group h3 svg {
      width: 36px;
      height: 36px;
      stroke: var(--blue);
      stroke-width: 1.5;
      fill: none;
      flex-shrink: 0;
    }
    .bloc-group .bloc-total {
      font-size: 0.875rem;
      color: var(--text-muted);
      margin-bottom: 1.5rem;
      text-align: center;
    }

    /* P3 spacing & details/summary — subgrid 7 rows for phase alignment */
    #p3 .pricing-grid {
      grid-template-rows: repeat(9, auto);
      gap: 0 1.5rem;
    }
    #p3 .pricing-grid {
      align-items: start;
    }
    #p3 .pricing-card {
      display: grid;
      grid-row: span 9;
      grid-template-rows: subgrid;
      row-gap: 0;
      transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    }
    #p3 .pricing-card:hover {
      transform: translateY(-6px);
      box-shadow: 0 20px 50px rgba(0, 51, 102, 0.15);
      border-color: var(--blue);
    }
    #p3 .phase-1-list { padding-top: 1.75rem; border-top: 1px solid rgba(0,0,0,0.06); }
    #p3 .phase-1-total { }
    #p3 .phase-2-list { padding-top: 1.75rem; border-top: 1px solid rgba(0,0,0,0.06); }
    #p3 .phase-2-total { }
    #p3 .phase-3-label { padding-top: 1.75rem; border-top: 1px solid rgba(0,0,0,0.06); }
    #p3 .phase-3-success { }
    /* Fallback for browsers without subgrid support (Firefox < 117, Safari < 16) */
    @supports not (grid-template-rows: subgrid) {
      #p3 .pricing-card {
        display: flex;
        flex-direction: column;
        grid-row: auto;
      }
    }
    @media (max-width: 768px) {
      #p3 .pricing-card { display: block; grid-row: auto; }
    }
    #p3 .pricing-card .phase-label { margin-bottom: 0.5rem; }
    #p3 .pricing-card ul { margin-bottom: 0.75rem; }
    #p3 .pricing-card p { margin-top: 0.25rem; margin-bottom: 0; }
    #p3 .pricing-card details { margin-top: 0.75rem; padding: 0; border-radius: 8px; }
    #p3 .pricing-card details summary {
      font-size: 0.8rem; color: var(--text-muted); cursor: pointer;
      list-style: none; padding: 0.4rem 0.6rem; font-weight: 500;
    }
    #p3 .pricing-card details summary::after { content: '+'; font-size: 1rem; }
    #p3 .pricing-card details[open] summary::after { content: '−'; }
    #p3 .pricing-card details summary::-webkit-details-marker { display: none; }
    #p3 .pricing-card details[open] > ul,
    #p3 .pricing-card details[open] > p,
    #p3 .pricing-card details[open] > .note { padding: 0 0.6rem; }
    #p3 .pricing-card details ul { font-size: 0.78rem; margin: 0; padding-left: 1.8rem; }
    #p3 .pricing-card details ul li { margin-bottom: 0; line-height: 1.35; }
    #p3 .pricing-card details p { font-size: 0.78rem; color: var(--text-muted); margin: 0; }
    #p3 .pricing-card details .note { font-style: italic; color: var(--text-muted); font-size: 0.72rem; margin: 0.1rem 0 0.3rem; padding: 0 0.6rem; }
    #p3 .pricing-card details .details-content { padding: 0 0.6rem 0.4rem; }

    /* Badge "Populaire" à cheval sur le bord supérieur */
    #p1 .pricing-card.featured {
      overflow: visible;
    }
    #p1 .pricing-card.featured .badge {
      position: absolute;
      top: 0;
      left: 50%;
      transform: translate(-50%, -50%);
      z-index: 1;
      background: #fdf4dc;
      border: 2px solid var(--yellow);
    }

    .tier-discount {
      margin-top: auto;
      margin-bottom: 1rem;
      padding: 0.5rem 1rem;
      background: rgba(243,193,58,0.12);
      border: 1px solid rgba(243,193,58,0.3);
      border-radius: 8px;
      font-size: 0.8125rem;
      font-weight: 600;
      color: #D4A832;
      text-align: center;
    }

    .scenario-bloc {
      margin-top: 1.5rem; padding-top: 1rem;
      border-top: 1px solid rgba(0,0,0,0.1);
    }
    .scenario-bloc h4 { font-size: 0.85rem; color: var(--yellow); margin-bottom: 0.5rem; }
    .scenario-table { width: 100%; font-size: 0.75rem; border-collapse: collapse; }
    .scenario-table td { padding: 0.15rem 0; }
    .scenario-table .total { font-weight: 700; color: var(--yellow); }
    .scenario-table .saving { color: #4ade80; font-size: 0.7rem; }

    .phase-label {
      display: inline-block;
      background: rgba(0, 51, 102, 0.1);
      color: var(--blue);
      padding: 0.25rem 0.75rem;
      border-radius: 100px;
      font-size: 0.75rem;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.05em;
      margin-bottom: 1rem;
    }

    #p2 .pricing-grid {
      grid-template-columns: repeat(2, 1fr);
      max-width: 66%;
      margin: 1.5rem auto 0;
      align-items: stretch;
    }

    /* P2 cards on light background */
    .p2-card {
      background: #fff;
      border: 1px solid #e2e8f0;
      border-top: 4px solid var(--blue);
      border-radius: 16px;
      padding: 2rem;
      transition: transform 0.3s, box-shadow 0.3s;
      display: flex;
      flex-direction: column;
      box-shadow: 0 2px 8px rgba(0,0,0,0.04);
      position: relative;
      overflow: hidden;
    }
    .p2-card:hover {
      transform: translateY(-4px);
      box-shadow: 0 16px 40px rgba(0, 51, 102, 0.12);
    }
    .p2-card::after {
      content: '';
      position: absolute;
      bottom: 0; left: 0; right: 0;
      height: 3px;
      background: linear-gradient(90deg, var(--blue), var(--yellow));
      transform: scaleX(0);
      transition: transform 0.3s ease;
    }
    .p2-card:hover::after {
      transform: scaleX(1);
    }
    .p2-card .tier-name {
      font-size: 1.1rem;
      font-weight: 700;
      color: #111;
      margin-bottom: 0.5rem;
      text-align: center;
    }
    .p2-card .price {
      font-size: 2rem;
      font-weight: 700;
      color: var(--blue);
      margin-bottom: 0.5rem;
      text-align: center;
    }
    .p2-card .price .price-unit {
      font-size: 0.875rem;
      color: #666;
      font-weight: 400;
    }
    .p2-card ul {
      list-style: none;
      padding: 0;
      margin-bottom: 1rem;
    }
    .p2-card ul li {
      font-size: 0.8125rem;
      color: #444;
      padding: 0.3rem 0;
      padding-left: 1.25rem;
      position: relative;
      line-height: 1.4;
    }
    .p2-card ul li::before {
      content: '✓';
      position: absolute;
      left: 0;
      color: var(--blue);
      font-weight: 700;
    }
    .p2-card details {
      background: rgba(243, 193, 58, 0.10);
      border: 1px solid rgba(243, 193, 58, 0.25);
      border-radius: 8px;
      margin-top: auto;
    }
    .p2-card details summary {
      padding: 0.75rem 1rem;
      font-size: 0.8125rem;
      font-weight: 600;
      color: var(--blue);
    }
    .p2-card details summary::after {
      color: var(--blue);
      font-size: 1rem;
    }
    .p2-card details summary:hover {
      background: #f1f5f9;
    }
    .p2-card details .details-content {
      padding: 0 1rem 1rem;
      font-size: 0.8125rem;
      color: #444;
      line-height: 1.6;
    }
    .p2-card details .details-content ul {
      margin-bottom: 0.75rem;
    }
    .p2-card details .details-content p {
      font-weight: 600;
      color: #111;
      margin-bottom: 0.25rem;
      font-size: 0.8125rem;
    }

    @media (max-width: 1024px) {
      #p2 .pricing-grid { grid-template-columns: repeat(2, 1fr); max-width: 100%; }
    }
    /* P2 stagger cascade animation */
    .stagger-up {
      opacity: 0;
      transform: translateY(30px) scale(0.95);
      transition: opacity 0.5s ease, transform 0.5s ease;
    }
    .stagger-up.visible {
      opacity: 1;
      transform: translateY(0) scale(1);
    }

    /* Module number badges on P2 cards */
    .module-num {
      display: inline-flex; align-items: center; justify-content: center;
      width: 1.5em; height: 1.5em; border-radius: 50%;
      background: var(--yellow); color: var(--blue-dark); font-weight: 700;
      font-size: 0.85em; margin-right: 0.5em; flex-shrink: 0;
    }

    /* Phase-modules reference in P3 mandates */
    .phase-modules {
      font-size: 0.95rem; color: var(--blue); font-weight: 600;
      margin: 0.5em 0; padding: 0.4em 0;
    }

    @media (max-width: 768px) {
      .conditions-grid { grid-template-columns: 1fr; }
      #p2 .pricing-grid { grid-template-columns: 1fr; }
    }
