/* === QUALIOPI GLOBAL STYLES === */

.badge {
    display: inline-block;
    padding: 0.3em 0.7em;
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem; /* rounded-md */
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-commun {
    color: #1e40af; /* blue-800 */
    background-color: #dbeafe; /* blue-100 */
}

.badge-specifique {
    color: #991b1b; /* red-800 */
    background-color: #fee2e2; /* red-100 */
}

/* === QUALIOPI LISTING PAGE STYLES === */

.qualiopi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.indicator-card {
    background-color: #fff;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.75rem; /* rounded-xl */
    padding: 1.5rem;
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.indicator-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.indicator-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.indicator-card-header h3 {
    font-size: 1.125rem; /* text-lg */
    font-weight: 600;
    color: #111827; /* gray-900 */
    margin: 0;
}

.indicator-card p {
    font-size: 0.9rem;
    color: #4b5563; /* gray-600 */
    line-height: 1.5;
}

.indicator-card a {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
}

.indicator-card a:hover {
    text-decoration: underline;
}


/* Non-conformity card styling */
.indicator-page .card.card--non-conformity {
    background-color: #fff5f5;
    border-left: 4px solid #e53e3e;
}

.indicator-page .card.card--non-conformity h3 {
    color: #c53030 !important; /* Darker red for the title */
}

.card .card-subtitle {
    font-size: 0.9rem;
    font-weight: 500;
    color: #718096; /* Gray color for the subtitle */
    margin-top: -1rem; /* Adjust position to be close to the title */
    margin-bottom: 1rem;
}

/* New styles for indicator page header */
.indicator-main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
    margin-bottom: 0.5rem; /* Space between title line and subtitle */
}

.indicator-main-header .indicator-title-group {
    flex-grow: 1;
}

.hero-coverage-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
}

/* Style for the hero coverage section label */
.hero-coverage-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* New styles for the hero coverage circle (ring style) */
.hero-coverage-circle {
    width: 100px; /* Increased size for better visual */
    height: 100px;
    border-radius: 50%;
    background-color: transparent; /* Transparent background */
    border: 8px solid var(--color-secondary); /* Ring effect */
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.hero-coverage-circle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.25);
}

.hero-coverage-circle .indicator-coverage-score {
    font-size: 1.8rem; /* Adjusted size */
    font-weight: 700;
    color: #FFFFFF; /* White text */
}

.indicator-header {
    text-align: center;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.indicator-title-group h1 {
    margin-bottom: 0.25rem;
}

.indicator-meta-group {
    display: flex;
    flex-direction: row; /* Align items horizontally */
    align-items: center; /* Vertically center them */
    gap: 1rem; /* Increase gap for better spacing */
    flex-shrink: 0;
}

.indicator-meta-group .indicator-type {
    font-weight: 600;
    color: #374151; /* gray-700 */
    font-size: 0.9rem;
}

.indicator-meta-group .indicator-categories {
    display: flex;
    gap: 0.5rem;
}

.indicator-meta-group .category-tag {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 4px;
    background-color: #f3f4f6; /* gray-100 */
    color: #6b7280; /* gray-500 */
    border: 1px solid #e5e7eb; /* gray-200 */
    min-width: 40px; /* Ensure consistent width */
}

.indicator-meta-group .category-tag.active {
    background-color: var(--color-secondary); /* Use site's secondary color */
    color: var(--color-primary); /* Match text color from list page */
    border-color: var(--color-primary); /* Match border color from list page */
}

/* === INDICATOR DETAIL PAGE STYLES === */

.indicator-page {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem;
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.indicator-hero {
    position: relative;
    padding: 4rem 1rem;
    min-height: 50vh;
    background-color: #f8f9fa;
    background-image: linear-gradient(to right, rgba(0, 106, 99, 0.85), rgba(29, 67, 65, 0.85)), url('../images/background-hero.jpg');
    background-size: cover;
    background-position: center;
    color: #ffffff;
}



.indicator-hero .hero-section__overlay {
    /* This can be used for a color overlay if not using gradient in the background-image */
    display: none; 
}

.indicator-hero .btn--back {
    margin-bottom: 2rem;
}

.indicator-hero .btn--back:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: #ffffff;
}

html {
    scroll-behavior: smooth;
}

.indicator-hero .indicator-header h2 {
    font-size: 2rem; /* Increased size */
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
}

.indicator-hero .indicator-header h1 {
    font-size: 3rem; /* Increased size */
    color: #ffffff;
}

.indicator-hero .criteria-prefix {
    color: #ffffff;
    font-weight: 600;
}

.indicator-hero .indicator-description {
    font-size: 1.4rem; /* Increased font size */
    font-weight: 500;
    color: var(--color-secondary);
    text-align: justify;
    margin-top: 1.5rem;
}

.scroll-down-arrow {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    color: #ffffff;
    font-size: 2rem;
    opacity: 0.7;
    transition: opacity 0.3s, transform 0.3s;
    animation: bounce 2.5s infinite;
}

.scroll-down-arrow:hover {
    opacity: 1;
    transform: translateX(-50%) scale(1.1);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translate(-50%, 0);
    }
    40% {
        transform: translate(-50%, -15px);
    }
    60% {
        transform: translate(-50%, -5px);
    }
}

.indicator-hero .indicator-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.indicator-header {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #e5e7eb; /* gray-200 */
}

.indicator-header h1 {
    font-size: 2.25rem; /* text-4xl */
    font-weight: 700;
    color: var(--color-primary);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.indicator-header h2 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 500;
    color: #374151; /* gray-700 */
    margin-top: 0;
    margin-bottom: 1rem; /* Add space below the criteria title */
}

.criteria-prefix {
    color: var(--color-primary);
}

.indicator-description {
    font-size: 1rem;
    color: #374151; /* gray-700 */
    line-height: 1.6;
    margin-bottom: 2rem;
}

.indicator-details .card {
    background-color: #ffffff;
    border: 1px solid #e5e7eb; /* gray-200 */
    border-radius: 0.75rem; /* rounded-xl */
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.indicator-details .card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
}

.indicator-details .card h3 {
    font-size: 1.25rem; /* text-xl */
    font-weight: 600;
    color: var(--color-primary);
    margin-top: 0;
    margin-bottom: 1rem;
}

/* Override for hero section */
.indicator-hero .indicator-header h1 {
    color: #ffffff;
}

.indicator-details .card p,
.indicator-details .card ul {
    font-size: 1rem;
    color: #374151; /* gray-700 */
    line-height: 1.6;
}

.indicator-details .card ul {
    padding-left: 1.5rem;
    margin-top: 0.5rem;
}

.indicator-details .card ul li {
    margin-bottom: 0.5rem;
}

.indicator-details .card-highlight {
    background-color: var(--color-secondary); /* Use site's secondary color */
    border-color: #bbf7d0; /* green-200 */
}

/* Remove old flex properties from h3 */
.indicator-details .card-highlight h3 {
    color: #15803d; /* green-700 */
    margin: 0; /* Reset margin */
    font-size: 1.25rem; /* Keep original size */
    font-weight: 600; /* Keep original weight */
}

/* New styles for the header container */
.card-highlight-header {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* Space between icon and title */
    margin-bottom: 1rem; /* Space below the header */
}

/* New styles for the icon */
.card-highlight-icon svg {
    display: inline-block;
    width: 1.5rem; /* Match font-size */
    height: 1.5rem; /* Match font-size */
    vertical-align: middle;
    color: #15803d;
}

.main-container.indicator-page {
    padding-top: 100px; /* Adjust this value based on header height */
}

.indicator-details .card-highlight {
    position: relative;
    padding-left: 1.5rem; /* Restore original padding */
    border-left: 5px solid #15803d; /* Dark green left border */
}


.qualiopi-container {
    display: flex;
    flex-direction: column;
    gap: 40px;
    margin-top: 40px;
}

.critere-card {
    background-color: var(--color-background-grey);
    padding: 25px 30px;
    border-radius: 8px;
    border-left: 5px solid var(--color-primary);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.critere-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 106, 99, 0.1);
}

.critere-card-header {
    display: flex;
    align-items: center;
    margin-bottom: 1.5rem;
    padding: 0 15px; /* Restaurer le padding horizontal pour l'alignement global */
}

.critere-card h2 {
    max-width: 85%;
    margin-right: 1rem;
    font-family: var(--font-primary);
    font-size: 1.4rem;
    color: var(--color-primary-darker);
    margin: 0;
}

.critere-coverage-wrapper {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 8px;
    margin-left: auto; /* Forcer l'alignement à droite */
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 20px;
    border: 1px solid transparent;
    white-space: nowrap;
    flex-shrink: 0;
}

.status-badge .score {
    font-size: 1em;
}

.status-traite {
    --tile-bg: #f7f7f7;
    color: #166534;
    border-color: #bbf7d0;
}

.status-partiel {
    --tile-bg: #fffbeb;
    color: #b45309;
    border-color: #fde68a;
}

.critere-card ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.critere-card li {
    margin-bottom: 8px;
}

.critere-card li:last-child {
    margin-bottom: 0;
}

.critere-card li a {
    min-height: 180px;
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--color-text);
    font-family: var(--font-secondary);
    text-decoration: none;
    padding: 15px;
    padding-bottom: 50px; /* Espace pour le bouton */
    border-radius: 5px;
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
    border: 1px solid #e5e7eb;
    position: relative; /* Contexte pour le bouton */
    --indicator-bg: var(--color-background-grey);
}

.critere-card li a:hover {
    background-color: var(--color-secondary);
    border-color: #d1d5db;
    --indicator-bg: var(--color-secondary);
}

.critere-card li a strong {
    font-weight: 700;
    color: var(--color-primary);
}

.indicator-meta {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0;
    margin-left: auto; /* Forcer l'alignement à droite */
}

.indicator-type {
    font-size: 0.8rem;
    padding: 4px 8px;
    border-radius: 15px;
    font-weight: 700;
    text-transform: uppercase;
    border: 1px solid;
    text-align: center;
    min-width: 80px;
}

.indicator-type-ic {
    border-color: #7dd3fc;
    background-color: #f0f9ff;
    color: #0369a1;
}

.indicator-type-is {
    border-color: #fcd34d;
    background-color: #fffbeb;
    color: #b45309;
}

.indicator-categories {
    display: flex;
    gap: 6px;
}

.category-tag {
    font-size: 0.75rem;
    font-weight: 700;
    width: 35px;
    text-align: center;
    padding: 4px 0;
    border-radius: 4px;
    color: #9ca3af;
    background-color: #f3f4f6;
    border: 1px solid #e5e7eb;
}

.category-tag.active {
    background-color: var(--color-secondary);
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.indicator-hero .container {
    max-width: 1140px; /* Wider container */
    margin: 0 auto;
}

.indicator-hero .description {
    text-align: justify;
}

.indicator-coverage {
    position: relative;
    width: 80px; /* Largeur fixe pour l'alignement */
    height: 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: radial-gradient(closest-side, var(--tile-bg, white) 79%, transparent 80% 100%),
                conic-gradient(var(--c, #16a34a) calc(var(--p, 0) * 1%), #e2e8f0 0);
    flex-shrink: 0; /* Empêche la jauge de rétrécir */
}


.indicator-coverage::before {
    content: '';
    position: absolute;
    inset: 5px;
    background: var(--indicator-bg); /* Default for indicators in list */
    border-radius: 50%;
    z-index: 1;
}

.disclaimer-notice {
    margin-top: 40px;
    padding: 20px;
    background-color: #f8f9fa;
    border-left: 4px solid var(--color-secondary);
    font-size: 0.9rem;
    color: #495057;
    line-height: 1.6;
}

.disclaimer-notice p {
    margin: 0;
}

.disclaimer-notice i {
    margin-right: 10px;
    color: var(--color-secondary);
}

.coverage-100 .indicator-coverage {
    --c: #006A63;
}

.critere-card-header .indicator-coverage::before {
    background: var(--color-background-grey); /* Specific for header gauge */
}

.coverage-label {
    font-size: 0.6rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    margin-bottom: 2px;
    z-index: 2;
    line-height: 1.2;
    text-align: center;
}

.indicator-coverage-score {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--c, #1f2937);
}

.indicator-coverage.score-100 {
    --p: 100;
    --c: var(--color-primary);
}
.indicator-coverage.score-88 {
    --p: 88;
    --c: #65a30d;
}
.indicator-coverage.score-87 {
    --p: 87;
    --c: #65a30d;
}
.indicator-coverage.score-80 {
    --p: 80;
    --c: #65a30d;
}
.indicator-coverage.score-60 {
    --p: 60;
    --c: #f59e0b;
}
.indicator-coverage.score-40 {
    --p: 40;
    --c: #ea580c;
}

.indicator-coverage-score {
    color: var(--c, #1f2937);
    position: relative; /* Assure que z-index est appliqué */
    z-index: 2; /* Place le texte au-dessus des pseudo-éléments du cercle */
}
.score-na { color: #6b7280; font-size: 1rem; font-style: italic; }

.indicator-coverage.score-na {
    background: #e5e7eb;
}

.critere-card li a .btn-details {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0.4em 1em;
    border-radius: 20px;
    background-color: transparent;
    border: 1px solid var(--color-primary);
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.8rem;
    text-align: center;
    transition: all 0.3s ease;
    position: absolute;
    bottom: 15px;
    right: 15px;
    opacity: 0;
    transform: translateY(10px);
}

.critere-card li a:hover .btn-details {
    opacity: 1;
    transform: translateY(0);
}

.critere-card li a .btn-details i {
    font-size: 0.7rem;
}

/* === QUALIOPI INDICATOR DETAIL PAGE === */

.indicator-detail-header {
    text-align: center;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #e0e0e0;
}

.indicator-detail-header .btn {
    margin-bottom: 20px;
}

.indicator-title {
    font-size: clamp(2rem, 5vw, 3rem);
    color: var(--color-primary);
    margin: 0;
}

.indicator-subtitle {
    font-size: 1.1rem;
    color: #555;
    margin-top: 10px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.indicator-content {
    max-width: 800px;
    margin: 40px auto 0 auto;
}

.indicator-category.active {
    background-color: var(--color-primary);
    color: var(--color-text-light);
}

.indicator-content > div {
    background-color: #fff;
    padding: 30px;
    border-radius: 8px;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.04);
    border: 1px solid #e9ecef;
}

.indicator-content h2 {
    font-size: 1.6rem;
    color: var(--color-primary-darker);
    margin-bottom: 1.5rem;
    display: flex;
}

/* === NAVIGATION BUTTONS === */

.navigation-buttons {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 3rem;
    margin-bottom: 2rem;
    padding-top: 2rem;
    border-top: 1px solid #e5e7eb; /* gray-200 */
}
    align-items: center;
    gap: 10px;
}

.indicator-content h2 .fa-check-circle {
    color: #28a745;
}

.indicator-content h3 {
    font-size: 1.3rem;
    color: var(--color-primary);
    margin-bottom: 1rem;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--color-secondary);
    display: inline-block;
}

.indicator-content h3 .fa-folder-open {
    margin-right: 8px;
}

.indicator-content p {
    line-height: 1.8;
    margin-bottom: 1rem;
}

.indicator-content ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem;
}

.indicator-content ul li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    line-height: 1.6;
}

.indicator-content ul i {
    color: var(--color-primary);
    font-size: 1.1rem;
    margin-top: 0.2em;
    width: 20px;
    text-align: center;
}



.argalis-response h4 {
    font-size: 1.1rem;
    color: var(--color-primary-darker);
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

/* --- Guide Version Notice --- */
.guide-version-notice {
    background-color: #eef2ff; /* Light blue background */
    border-left: 4px solid #4338ca; /* Primary color border */
    padding: 1rem 1.5rem;
    margin-bottom: 2.5rem; /* Space before the first criteria card */
    border-radius: 0.5rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.guide-version-notice p {
    margin: 0;
    font-size: 1rem;
    color: #3730a3; /* Darker blue for text */
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.guide-version-notice a {
    font-weight: 600;
    text-decoration: underline;
    color: #3730a3;
}

.guide-version-notice a:hover {
    color: #312e81;
}

.guide-version-notice .fas {
    font-size: 1.2rem;
    color: #4338ca;
}

